package com.knife.rockknife4jdemo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import lombok.Data;

/**.
 * 待预录信息
 * @author lht
 */
@Data
@ApiModel("待预录信息")
public class WaitPrerecordDTO {


    private Long id;


    @ApiModelProperty(value = "数据准备中，待预录，预录中，预录失败，进港对比，进港异常，正常完成，异常完成")
    private String status;


    @ApiModelProperty(value = "箱子id")
    private Long containerId;

    @ApiModelProperty(value = "船名")
    private String vessel;

    @ApiModelProperty(value = "航次")
    private String voyage;

    @ApiModelProperty(value = "港区")
    private String portDistrict;

    @ApiModelProperty(value = "港区名称")
    private String portDistrictName;

    @ApiModelProperty(value = "卸货港代码")
    private String dischargePortCode;

    @ApiModelProperty(value = "箱营运人代码")
    private String ctnOperatorCode;

    @ApiModelProperty(value = "目的港")
    private String placeOfDelivery;

    @ApiModelProperty(value = "箱型")
    private String containerType;

    @ApiModelProperty(value = "数据指令 0：提单号和数据按工厂、1：提单号和数据按系统、2：提单号按系统，数据按工厂")
    private Integer gateinType;

    @ApiModelProperty(value = "箱号")
    private String containerNumber;

    @ApiModelProperty(value = "封号")
    private String sealNo;

    @ApiModelProperty(value = "皮重")
    private BigDecimal tareWeight;

    @ApiModelProperty(value = "预录状态 Undo：未预录、Prerecording：预录中、Done：已预录、Fail：预录失败")
    private String preRecordStatus;

    @ApiModelProperty(value = "预录任务类别 LACK：数据缺失、INCONSISTENT:数据不一致、PRE_RECORD_FAIL：数据预录失败、NOT_DATA_CHANGE：数据未改变、DATA_WARNING：数据疑似异常、CONSISTENT：数据比对成功")
    private String preRecordTaskType;

    @ApiModelProperty(value = "预录方式 Online:线上预录、Platform:供应商、Offline:司机线下预录、NoPreRecord:不需要预录")
    private String preRecordType;

    @ApiModelProperty(value = "提单号")
    private String blNo;

    @ApiModelProperty(value = "包装数量")
    private BigDecimal packageQty;

    @ApiModelProperty(value = "货重")
    private BigDecimal weight;

    @ApiModelProperty(value = "体积")
    private BigDecimal volume;

    @ApiModelProperty(value = "总包装数量")
    private BigDecimal totalPackageQty;

    @ApiModelProperty(value = "总货重")
    private BigDecimal totalOfCargo;

    @ApiModelProperty(value = "总重")
    private BigDecimal totalWeight;

    @ApiModelProperty(value = "总体积")
    private BigDecimal totalVolume;

    @ApiModelProperty(value = "预录失败原因类别: 1,数据缺失/待核实 LackOrUnchecked 2,调用失败 FailCall")
    private String failReasonType;

    @ApiModelProperty(value = "预录失败原因详情")
    private String failReasonDetail;

    @ApiModelProperty(value = "预录小票url")
    private String prerecordReceiptUrl;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "货代结算代码")
    private String settlementCode;

    @ApiModelProperty(value = "创建人")
    private String createdBy;

    @ApiModelProperty(value = "创建时间")
    private Date creationTime;

    @ApiModelProperty(value = "最后更新时间")
    private Date lastUpdateTime;

    @ApiModelProperty(value = "修改人")
    private String updatedBy;

    @ApiModelProperty(value = "版本号")
    private Long version;

    @ApiModelProperty(value = "付费代理(太仓)")
    private String paymentAgent;
    @ApiModelProperty(value = "支线船名【太仓港必填】")
    private String branchVessel;
    @ApiModelProperty(value = "支线航次")
    private String branchVoyage;
    @ApiModelProperty(value = "支线港区(太仓")
    private String branchPortDistrict;
    @ApiModelProperty(value = "支线港区名称(太仓")
    private String branchPortDistrictName;
    @ApiModelProperty(value = "卸货港【中转港】")
    private String dischargingPort;
    @ApiModelProperty(value = "0:直航,1:驳船,2:沪太通")
    private Integer transportBusinessType;
    @ApiModelProperty(value = "内外贸标记 ： 内贸，外贸")
    private String tradeFlag;

    @ApiModelProperty(value = "货物信息")
    private List<ContainerCargoCollectionDTO> containerInfos;

    public Integer getTransportBusinessType() {
        if(null == this.transportBusinessType){
            return 1;
        }
        return transportBusinessType;
    }
}
